<?php
session_start();
//if($q[1]=='validate' && isset($_POST['submit'])){
	//echo $_SESSION['not_eligible'];
 ?>

<div class="center-block">
  <div class="well login-form center">
    <h2><img src="../assets/css/images/bullet-form.png" />Login</h2>
    <hr>
    <form class="form-horizontal" action="loginfileds.php" method="post" name="formApp" id="formLogin" align="center">
      <div class="control-group">
        <label class="control-label" for="inputEmail">Email</label>
        <div class="controls">
          <input type="text" id="inputEmail" placeholder="Email" name="username" class="span6 required">
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="inputPassword">Password</label>
        <div class="controls">
          <input type="password" id="inputPassword" placeholder="Password" name="password" class="span6 required">
        </div>
      </div> 
      <div class="control-group">
        <div class="control">
          <p> Can't Access <a href="index.php?forgotpwd" class="text-info">Forgot Password?</a> </p>
         <!-- <button type="submit" class="btn" data-toggle="modal" data-target="#message">Sign in</button>-->
          <button type="submit" name="btn" class="btn">Sign in</button>
        </div><br />
        <div class="span control-group">
              <?php //if(isset($_SESSION['fb_user_id']) && $_SESSION['fb_user_id'] != 0) $fbuser = true; ?> 
            <a id="fbconnect" class="btn btn-large btn-primary fblogin" href="#"><i class="fa fa-facebook-square"></i>Connect With Facebook</a> 
          </div>
      </div>
    </form>
  </div>
</div>

         <?php 
		  if(isset($_SESSION['not_eligible']))
		  {?>
			  <div class="modal fade" id="message" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="none">

<div class="modal-dialog"><div class="modal-content">
<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><i class="fa fa-exclamation-triangle"></i>Apply Reloan</h4>
</div>

<div class="modal-body"> 
<div id="text">
<p><strong>"Unfortuantely, based on iDecision its appears you  are not currently eligible. Please reapply in 3 months time. Thank you."</strong></p>
</div>

</div>

<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div>
</div>
</div>
</div>
<script type="text/javascript">
$("#text").dialog({width:500,title:"Lets get started",autoOpen:true,modal:true}); 
$("#text").dialog("open"); 
</script>
		<?php  session_destroy();  }

?>

 <script>
 $('#fbconnect').click(function(e) {
	e.preventDefault();
//  window.open("http://maxcash.com.au/chatpop.html","","width=640,height=460");
	var fdata = $(this).attr('data');
	if(fdata == 'disabled')
	{
		e.preventDefault();
		$(this).attr('style', 'cursor:not-allowed;');
		return false;
	}
	else
	{
		fbpopup = window.open("../hoauth/social_hub/login.php?provider=facebook","","width=640,height=340");
	}

});
 </script>

<!--<div class="modal fade" id="message" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none">

<div class="modal-dialog"><div class="modal-content">
<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title" id="myModalLabel"><i class="fa fa-exclamation-triangle"></i>Apply Reloan</h4>
</div>

<div class="modal-body"> 
<div id="text" style="font-size:14px; font-family:Arial, Helvetica, sans-serif"></div>
<script type="text/javascript"  src="../assets/js/loginpopup.js"></script>
</div>

<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Close</button></div>
</div>
</div>
</div>-->
